package c.e.a.b.b.h;

import android.content.Context;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.util.Log;
import c.e.a.b.b.k.b;
import com.huawei.hms.analytics.core.crypto.AesCipher.AesLen;
import javax.annotation.concurrent.GuardedBy;

public final class u {
    public static Object a = new Object();
    @GuardedBy("sLock")
    public static boolean b;
    public static String c;
    public static int d;

    public static void a(Context context) {
        synchronized (a) {
            if (b) {
                return;
            }
            b = true;
            try {
                Bundle bundle = b.a(context).a(context.getPackageName(), AesLen.ROOTKEY_COMPONET_LEN).metaData;
                if (bundle == null) {
                    return;
                } else {
                    c = bundle.getString("com.google.app.id");
                    d = bundle.getInt("com.google.android.gms.version");
                }
            } catch (NameNotFoundException e) {
                Log.wtf("MetadataValueReader", "This should never happen.", e);
            }
        }
    }
}
